package a1;

import com.common.ByteBuf;
import com.common.Unpooled;

public class ByteBufTest0 {
    public static void main(String[] args) {
        ByteBuf buffer = Unpooled.buffer(10);//一个是池化的，一个不是池化的（用完就销毁）

        for (int i = 0; i < 10; ++i) {
            buffer.writeByte(i);
        }

        for (int i = 0; i < buffer.capacity(); ++i) {
            System.out.println(buffer.getByte(i));
        }

       for(int i = 0; i < buffer.capacity(); ++i) {
           System.out.println(buffer.readByte());
       }
    }
}
